<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

    <style>
        * {
            padding: 0;
            margin: 0;
        }
        
        #demo {
            width: 200px;
            height: 100px;
            background-color: pink;
        }
        
        #test2 {
            width: 100vw;
            height: 20vh;
            background-color: green;
        }
        
        #son {
            width: 50px;
            height: 40px;
            background-color: red;
            display: visible;
        }
        /* 方法1  */
        
        .disappear {
            display: none;
        }
        /* .disappear {
            z-index: -10;
            position: absolute;
        } */
        /* .disappear {
            visibility: hidden;
        } */
    </style>
</head>

<body>
    <div class="disappear" id="demo">
        <div id="son">

        </div>
    </div>

    <div id="test2">

    </div>
</body>

</html>